import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooCmsArticleRelateTagsController } from '../../../controllers';
const uctoocmsArticleRelateTagsRouter = new Router();
const cmsArticleRelateTagsController = new uctooCmsArticleRelateTagsController();

uctoocmsArticleRelateTagsRouter.post('/add', requireUser, cmsArticleRelateTagsController.add);
uctoocmsArticleRelateTagsRouter.post('/edit', requireUser, rowLevelPermission('uctoo/cms_article_relate_tags'), cmsArticleRelateTagsController.edit);
uctoocmsArticleRelateTagsRouter.post('/del', requireUser, rowLevelPermission('uctoo/cms_article_relate_tags'), cmsArticleRelateTagsController.delete);

//For getting cmsArticleRelateTags with permission control
uctoocmsArticleRelateTagsRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/cms_article_relate_tags'), cmsArticleRelateTagsController.getSingle);
uctoocmsArticleRelateTagsRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/cms_article_relate_tags'), cmsArticleRelateTagsController.getMany);
uctoocmsArticleRelateTagsRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/cms_article_relate_tags'), cmsArticleRelateTagsController.getMany);

//#endregion AutoCreateCode
export default uctoocmsArticleRelateTagsRouter;
